import http from './http.interceptor.js'
/**
 * 请求接口命名规则
 * @param { post }   create  创建
 * @param { delete } delete  删除
 * @param { put }    update  更新
 * @param { get }    get     查看
 */

export default {
  // 初始化
  getConfig() {
    return http.get(`/config/init`)
  },
  /* 排版配置 */
  getConfigTypeset() {
    return http.get(`/config/typeset`)
  },
  /* 获取机构id */
  getConfigSdn() {
    return http.get(`/config/sdn`)
  },
  // openid
  getConfigOpenid(query) {
    return http.get(`/pay/wxopenid`, query)
  },
  // 微信获取openid
  getConfigThirdloginOpenid(query) {
    return http.get(`/config/thirdlogin/openid`, query)
  },
  /* 首页 */
  getHomeInfo() {
    return http.get(`/home`)
  },
  /* 验证码 */
  createVerify(params) {
    return http.post(`/sms/verify`, params)
  },
  /* 登录 */
  createUserLogin(params) {
    return http.post(`/user/account/login`, params)
  },
  /* 找回密码-短信验证 */
  createUserAccountVerify(params) {
    return http.post(`/user/account/pwd/verify`, params)
  },
  /* 找回密码-重置密码 */
  createUserAccountReset(params) {
    return http.put(`/user/account/pwd/reset`, params)
  },
  /* 设置密码 */
  createUserAccountPwdSet(params) {
    return http.put(`/user/account/pwd/set`, params)
  },
  /*  登录配置 */
  getConfigLogin() {
    return http.get(`/config/login`)
  },
  /*  app登录 */
  getAppLogin(query) {
    return http.post(`/user/account/thirdlogin`, query)
  },
  /*  小程序微信登录 */
  setUserLoginMiniapp(query) {
    return http.post(`/user/account/miniapp`, query)
  },

  // 绑定状态
  getUserThirdloginBind() {
    return http.get(`/user/thirdlogin/bind`)
  },
  // 解绑绑定状态
  deleteUserThirdloginBind(params) {
    return http.delete(`/user/thirdlogin/bind`, params)
  },
  // 三方登录绑定
  postBindLogin(query) {
    return http.post(`/user/thirdlogin/bind`, query)
  },
  // 绑定状态
  getConfigThirdlogin(params) {
    return http.get(`/config/thirdlogin`, params)
  },
  // h5微信绑定
  getWechatLogin(param) {
    return http.get(`/config/thirdlogin/h5bind`, param)
  },
  /* 用户信息 */
  getAccountInfo() {
    return http.get(`/user/account/info`)
  },
  /* 个人信息-编辑 */
  putAccountEdit(query) {
    return http.put(`/user/account/edit`, query)
  },
  /* 个人信息-修改手机号-验证 */
  createAccountPhone(query) {
    return http.post(`/user/account/phone`, query)
  },
  /* 意向课程 */
  updateCourseFavorite(params) {
    return http.put(`/user/course/favorite`, params)
  },
  /* 课程类型 */
  getUserCourseBaseType() {
    return http.get(`/course/base/type`)
  },
  /* 课程列表 */
  getCourseList(params) {
    return http.get(`/course/base/list`, params)
  },
  /* 课程详情 */
  getCourseDetails(id) {
    return http.get(`/course/base/${id}`)
  },
  /* 课程课时目录 */
  getCourseSection(id, pid, params) {
    return http.get(`/course/base/${id}/section/${pid}`, params)
  },
  /* 班级-课程目录 */
  getCourseClassesMenu(id) {
    return http.get(`/course/classes/${id}/menu`)
  },
  /* 课程评论列表 */
  getCourseComment(id, params) {
    return http.get(`/course/base/${id}/comment`, params)
  },
  /* 课程评论点赞 */
  getCourseCommentLike(id, params) {
    return http.put(`/course/base/comment/${id}/like`, params)
  },
  /* 课程评论回复列表 */
  getCourseCommentReply(id, params) {
    return http.get(`/course/base/comment/${id}/reply`, params)
  },
  /* 课程评论添加点评或回复评论 */
  createCourseCommentReply(id, params) {
    return http.post(`/course/base/comment/${id}/reply`, params)
  },
  /* 课程评论回复列表点赞 */
  getCourseCommentReplyLike(id, params) {
    return http.put(`/course/base/comment/reply/${id}/like`, params)
  },
  /* 课程添加点评 */
  createCourseComment(id, params) {
    return http.post(`/course/base/${id}/comment`, params)
  },
  /* 热门搜索 */
  getCourseSearchHot() {
    return http.get(`/course/base/search/hot`)
  },
  /* 发现 */
  getConfigDiscovery() {
    return http.get(`/config/discovery`)
  },
  /* 学习 */
  getCourseStudy() {
    return http.get(`/course/base/record/fetch`)
  },
  /* 加入的课程 */
  getCourseRecordCourse(query) {
    return http.get(`/course/base/record/course`, query)
  },
  /* 用户加入免费课程 */
  createCourseStudentJoin(query) {
    return http.post(`/course/student/join`, query)
  },
  /* 添加学习记录 */
  createCourseRecord(query) {
    return http.post(`/course/base/record`, query)
  },
  /* 个人中心 */
  getUserProfile(params) {
    return http.get(`/user/profile`)
  },
  /* 课程订单 */
  getOrderCourse(query) {
    return http.get(`/order/course/one`, query)
  },
  /* 课程生成订单 */
  postOrderCourse(query) {
    return http.post(`/order/course/one`, query)
  },
  /* 课程卡券-用户领取的卡券 */
  getCouponCourseUser(query) {
    return http.get(`/course/coupon/course/user`, query)
  },
  /* 课程-添加到购物车 */
  postCoursePaymentCart(query) {
    return http.post(`/course/payment/cart`, query)
  },
  /* 课程-点播课时链接fileurl */
  getCourseSectionFileurl(id, sid, params) {
    return http.get(`/course/base/${id}/section/${sid}/fileurl`, params)
  },
  /* 课程点播课时云端视频数据 */
  getCourseSectionVideo(id, sid, stock) {
    return http.get(`/course/base/${id}/section/${sid}/video/${stock}`)
  },
  /* 购物车数量 */
  getCartNum() {
    return http.get(`/user/cart/num`)
  },
  /* 购物车列表 */
  getPaymentCart() {
    return http.get(`/course/payment/cart`)
  },
  /* 移除购物车商品 */
  deletePaymentCart(query) {
    return http.delete(`/course/payment/cart`, query)
  },
  /* 移除购物车商品 */
  deletePaymentCart(query) {
    return http.delete(`/course/payment/cart`, query)
  },
  /* 机构对应的卡券 */
  getCourseCouponSchool(query) {
    return http.get(`/course/coupon/school`, query)
  },
  /* 卡券领取 */
  postCourseCouponDerive(id) {
    return http.post(`/course/coupon/${id}/derive`)
  },
  /* 卡券-课程卡直接兑换 */
  postCourseCouponExchange(params) {
    return http.post(`/course/coupon/exchange`, params)
  },
  /* 课程可用卡卷 */
  getCourseCoupon(query) {
    return http.get(`/course/coupon/course`, query)
  },
  /* 切换卡卷更新积分选择 */
  getCoursecredit(query) {
    return http.get(`/order/course/credit`, query)
  },
  /* 购物车订单页面 */
  getOrderCourseCart(query) {
    return http.get(`/order/cart`, query)
  },
  /* 购物车生成订单 */
  postOrderCourseCart(query) {
    return http.post(`/order/cart`, query)
  },
  /* 切换卡卷更新积分选择购物车 */
  getCartCredit(query) {
    return http.get(`/order/cart/credit`, query)
  },
  /* 领取对应机构的卡券 */
  getCourseCouponSchoolUser(query) {
    return http.get(`/course/coupon/school/user`, query)
  },
  /* 获取支付方式 */
  getOrderPay() {
    return http.get(`/order/pay`)
  },
  /* 订单查询 */
  getOrderMsg(param) {
    return http.get(`/pay/orderquery`, param)
  },
  /* 订单支付 */
  postOrderPay(query) {
    return http.post(`/order/pay`, query)
  },
  /* 提交 */
  createCollection(query) {
    return http.post(`/user/collection`, query)
  },
  /* 取消收藏 */
  deleteCollection(query) {
    return http.delete(`/user/collection`, query)
  },
  /* 课时购买订单页面 */
  getOrderSection(query) {
    return http.get(`/order/section`, query)
  },
  /* 课时购买生成订单 */
  postOrderSection(query) {
    return http.post(`/order/section`, query)
  },
  /*课程-笔记列表*/
  getCourseNoteList(query) {
    return http.get(`/course/base/note/list`, query)
  },
  /*课程-笔记-添加*/
  postCourseNote(query) {
    return http.post(`/course/base/note`, query)
  },
  /*课程-笔记-修改*/
  putCourseNote(id, query) {
    return http.put(`/course/base/note/${id}`, query)
  },
  /*点播课时链接fileurl*/
  getCourseSectionFileurl(id, sid, params) {
    return http.get(`/course/base/${id}/section/${sid}/fileurl`, params)
  },
  /* 分类 */
  getCategory(query) {
    return http.get(`/category/tree`, query)
  },
  /* 用户订单-全部订单 */
  getOrderList(type, query) {
    return http.get(`/user/order/${type}`, query)
  },
  /* 用户订单-删除订单 */
  deleteUserOrder(query) {
    return http.delete(`/user/order`, query)
  },
  /* 用户订单-取消订单 */
  putUserOrderCancel(query) {
    return http.put(`/user/order/cancel`, query)
  },
  /* 用户订单-订单详情 */
  getOrderInfo(order_no) {
    return http.get(`/user/order/info/${order_no}`)
  },
  /* 余额-基础信息 */
  getUserBalance() {
    return http.get(`/user/balance`)
  },
  /* 余额-明细 */
  getUserBalanceFlow(query) {
    return http.get(`/user/balance/flow`, query)
  },
  /* 用户-余额-充值-生成订单 */
  createUserRecharge(query) {
    return http.post(`/user/balance/order`, query)
  },
  /* 支付宝支付-回调 */
  postReturnPay() {
    return http.post(`/payback/alipay`)
  },
  /* 积分-基础信息 */
  getUserCredit(param) {
    return http.get(`/user/credit/base`, param)
  },
  /* 积分-明细 */
  getUserCreditFlow(query) {
    return http.get(`/user/credit/flow`, query)
  },
  /* 积分-签到 */
  getCoinPunchIn() {
    return http.post(`/user/credit/signIn`)
  },
  /* 积分-充值 */
  createUserCredit(query) {
    return http.post(`/user/credit`, query)
  },
  /* 收入-基础信息 */
  getUserIncome() {
    return http.get(`/user/income`)
  },
  /* 收入-提现余额 */
  postUserIncomeEncashmentBalance(params) {
    return http.post(`/user/income/encashment/balance`, params)
  },
  /* 收入-提现支付宝 */
  postUserIncomeEncashmentAlipay(params) {
    return http.post(`/user/income/encashment/alipay`, params)
  },
  /* 收入-提现微信 */
  postUserIncomeEncashmentWxpay(params) {
    return http.post(`/user/income/encashment/wxpay`, params)
  },
  // 收入-提现微信-检查状态
  getIncomeEncashmentWxpayCheck(params) {
    return http.get(`/user/income/encashment/wxpay/check`, params)
  },
  /* 收入-明细 */
  getUserIncomeFlow(query) {
    return http.get(`/user/income/flow`, query)
  },
  /* 推广-课程 */
  getUserIncomeCourse(query) {
    return http.get(`/user/income/course`, query)
  },
  /* 推广-用户 */
  getUserIncomeUser(query) {
    return http.get(`/user/income/user`, query)
  },
  /* 班级-学员 */
  getCourseClassesStudents(id) {
    return http.get(`/course/classes/${id}/students`)
  },
  /* 收藏-列表 */
  getUserCollectionList(query) {
    return http.get(`/user/collection`, query)
  },
  /* 收藏-批量取消 */
  deleteUserCollectionBatch(query) {
    return http.delete(`/user/collection/batch`, query)
  },
  /* 我的学习记录 */
  getCourseRecordList(query) {
    return http.get(`/course/base/record/list`, query)
  },
  /* 我的卡券-列表 */
  getUserCouponList(type, query) {
    return http.get(`/user/coupon/${type}`, query)
  },
  /* 我的卡券-兑换 */
  postUserCouponExchange(query) {
    return http.post(`/user/coupon/exchange`, query)
  },
  /* 公共-获取试题 */
  getExamTopic(param) {
    return http.get(`/exam/topic`, param)
  },
  /* 错题本-记录列表 */
  getRollExamList(param) {
    return http.get(`/user/exam/record/list`, param)
  },
  /* 错题本-列表 */
  getWrongList(param) {
    return http.get(`/exam/topic/wrong/list`, param)
  },
  /* 错题本-顺序重练获取试题 */
  getWrongTopic(param) {
    return http.get(`/exam/topic/wrong`, param)
  },
  /* 错题本-答案提交 */
  referWrongTopic(query) {
    return http.post(`/exam/topic/wrong`, query)
  },
  /* 错题本-错题解析 */
  getWrongAnalysis(param) {
    return http.get(`/user/exam/record/wrong`, param)
  },
  /* 考试结果基础-全部解析 */
  getExamRecoed(param) {
    return http.get(`/user/exam/record`, param)
  },
  /* 错题重练-获取试题 */
  getWrongAgain(param) {
    return http.get(`/user/exam/record/wrong/topic`, param)
  },
  /* 获取记录-试题信息 */
  getExamMsg(param) {
    return http.get(`/user/exam/record/topic`, param)
  },
  /* 考试-板块 */
  getExaminationModule(param) {
    return http.get(`/exam/module/list`,param)
  },
  /* 知识点-获取-试题 */
  getPointTopic(param) {
    return http.get(`/exam/point/prictice/topic`, param)
  },
  /* 考试-专项-列表 */
  getExaminationList(param) {
    return http.get(`/exam/special/list`, param)
  },
  /* 考试-专项-搜索 */
  getSpecialSearch(param) {
    return http.get(`/exam/special/search`, param)
  },
  /* 考试-专项-试题基础信息 */
  getSpecialBase(param) {
    return http.get(`/exam/special/base`, param)
  },
  /* 考试-专项-获取试题 */
  getSpecialTopic(param) {
    return http.get(`/exam/special/topic`, param)
  },
  /* 考试-专项-清空答题记录 */
  getClearSpecial(param) {
    return http.delete(`/exam/special/record`, param)
  },
  /* 公开考试-订单渲染 */
  renderPaperOrder(param) {
    return http.get(`/order/exam/paper`, param)
  },
  /* 公开考试-生成订单 */
  createPaperOrder(query) {
    return http.post(`/order/exam/paper`, query)
  },
  /* 公开考试-答案提交 */
  referExamAnswer(query) {
    return http.post(`/exam/paper/answer`, query)
  },
  /* 考试-记录列表 */
  recordExamList(param) {
    return http.get(`/user/examination/list`, param)
  },
  /* 知识点-分类-列表 */
  getKnowledgeList(param) {
    return http.get(`/exam/point/list`, param)
  },
  /* 知识点-选择 */
  getPointPrictice(param) {
    return http.get(`/exam/point/prictice/basic`, param)
  },
  /* 知识点-练习-答案提交 */
  referPricticeTopic(query) {
    return http.post(`/exam/point/prictice/topic`, query)
  },
  /* 专项-练习-答案提交 */
  referSpecialTopic(query) {
    return http.post(`/exam/special/topic`, query)
  },
  /* 收藏/取消收藏-试题 */
  getTopicCollect(query) {
    return http.post(`/exam/topic/collect`, query)
  },
  /* 收藏列表 */
  getCollectList(param) {
    return http.get(`/exam/topic/collect/list`, param)
  },
  /* 专项-列表 */
  getSpecialList(param) {
    return http.get(`/exam/special/list`, param)
  },
  /* 专项-练习-订单渲染 */
  renderSpecialOrder(param) {
    return http.get(`/order/exam/special`, param)
  },
  /* 专项-练习-生成订单 */
  createSpecialOrder(query) {
    return http.post(`/order/exam/special`, query)
  },
  /* 套卷-列表 */
  getRollupList(param) {
    return http.get(`/exam/rollup/list`, param)
  },
  /* 套卷-列表-搜索 */
  searchRollList(param) {
    return http.get(`/exam/rollup/search`, param)
  },
  /* 套卷-详情 */
  getRollDetail(param) {
    return http.get(`/exam/rollup/detail`, param)
  },
  /* 套卷-获取试卷基础信息 */
  getRollupBase(param) {
    return http.get(`/exam/rollup/paper/base`, param)
  },
  /* 套卷-获取试题 */
  getRollupTopic(param) {
    return http.get(`/exam/rollup/paper/topic`, param)
  },
  /* 套卷-交卷 */
  rdferRollupAnswer(query) {
    return http.post(`/exam/rollup/paper/answer`, query)
  },
  /* 套卷-订单-渲染 */
  renderRollOrder(param) {
    return http.get(`/order/exam/rollup`, param)
  },
  /* 套卷-生成-订单 */
  createRollOrder(query) {
    return http.post(`/order/exam/rollup`, query)
  },
  /* 考试-列表 */
  getExamList(param) {
    return http.get(`/exam/paper/list`, param)
  },
  /* 考试-列表-搜索 */
  getSearchList(param) {
    return http.get(`/exam/paper/search`, param)
  },
  /* 考试-分类 */
  getExamCategory(param) {
    return http.get(`/exam/paper/category`, param)
  },
  /* 考试-基础信息 */
  getPaperBaser(param) {
    return http.get(`/exam/paper/base`, param)
  },
  /* 考试-公开考试-获取试题 */
  getPaperTopic(param) {
    return http.get(`/exam/paper/topic`, param)
  },
  /* 讲师-认证-页面 */
  getUserTeacherAuth() {
    return http.get(`/user/teacher/auth`)
  },
  /* 讲师-认证-页面 */
  createUserTeacherAuth(query) {
    return http.post(`/user/teacher/auth`, query)
  },
  /* 讲师-主页-基础信息 */
  getUserTeacherPrincipal(id) {
    return http.get(`/user/teacher/${id}/basic`)
  },
  /* 讲师-主页-课程 */
  getTeacherCourse(id, param) {
    return http.get(`/user/teacher/${id}/course`, param)
  },
  /* 讲师-列表 */
  getUserTeacherList(params) {
    return http.get(`/user/teacher/list`, params)
  },
  /* 讲师 - 列表 - 全部等级 */
  getUserTeacherLeveList(params) {
    return http.get(`/user/teacher/levellist`, params)
  },
  /* 机构-认证-页面 */
  getSchoolAuth() {
    return http.get(`/school/auth`)
  },
  /* 机构-主页-页面 */
  getSchoolHome(id) {
    return http.get(`/school/${id}/home`)
  },
  /* 机构-列表-页面 */
  getSchoolList(param) {
    return http.get(`/school/list`, param)
  },
  /* 机构-更多课程-页面 */
  getSchoolCourse(id, param) {
    return http.get(`/school/${id}/course`, param)
  },
  /* 讲师-认证-提交 */
  createSchoolAuth(query) {
    return http.post(`/school/auth`, query)
  },
  /* 机构-搜索 */
  getSchoolSearch(query) {
    return http.get(`/school/search`, query)
  },
  /* 用户-修改密码 */
  updateAccountPwdEdit(query) {
    return http.put(`/user/account/pwd/edit`, query)
  },
  /* 支付密码-是否设置 */
  getUserBalancePwd() {
    return http.get(`/user/balance/pwd`)
  },
  /* 支付密码-验证手机号 */
  createUserBalancePwdVerify(query) {
    return http.post(`/user/balance/pwd/verify`, query)
  },
  /* 支付密码-设置 */
  createUserBalancePwd(query) {
    return http.post(`/user/balance/pwd`, query)
  },
  /* 支付密码-验证原密码 */
  createUserBalancePwdBefore(query) {
    return http.post(`/user/balance/pwd/before`, query)
  },
  /* 支付密码-修改密码 */
  putUserBalancePwd(query) {
    return http.put(`/user/balance/pwd`, query)
  },
  /* 会员-界面 */
  getUserVip() {
    return http.get(`/user/vip`)
  },
  /* 会员-购买 */
  createUserVip(query) {
    return http.post(`/user/vip`, query)
  },
  /* 会员-充值记录 */
  getUserVipLog(query) {
    return http.get(`/user/vip/log`, query)
  },
  /* 消息-课程提醒 */
  getUserSystemCourse(query) {
    return http.get(`/user/system/course`, query)
  },
  /* 消息-互动消息 */
  getUserNotifyComment(query) {
    return http.get(`/user/notify/comment`, query)
  },
  /* 消息-系统消息 */
  getUserSystemMessage(query) {
    return http.get(`/user/system/message`, query)
  },
  /* 消息-提问信息 */
  getUserNotifyQuestion(query) {
    return http.get(`/user/notify/question`, query)
  },
  /* 消息-提问信息 */
  createUserMessageRead(query) {
    return http.post(`/user/message/read`, query)
  },
  /* 用户-提问-对话框 */
  getUserQuestion(id, query) {
    return http.get(`/user/question/${id}`, query)
  },
  /* 用户-提问 */
  getUserProblem(query) {
    return http.post(`/user/question`, query)
  },
  /* 用户-关注-列表 */
  getUserFollowList(param) {
    return http.get(`/user/follow`, param)
  },
  /* 用户-关注 */
  getUserFollow(query) {
    return http.post(`/user/follow`, query)
  },
  /* 用户-最近访客 */
  getUserVisitor(param) {
    return http.get(`/user/visitor/recent`, param)
  },
  /* 用户-取消关注 */
  getUserDelFollow(query) {
    return http.delete(`/user/follow`, query)
  },
  /* 用户-提问回复 */
  createUserQuestionReply(query) {
    return http.post(`/user/question/reply`, query)
  },
  /* 用户-粉丝-列表 */
  getUserFansList(param) {
    return http.get(`/user/follow/follower`, param)
  },
  /* 我的授课-列表 */
  getUserTeacherCourse(type, query) {
    return http.get(`/user/teacher/course/${type}`, query)
  },
  /* 班级-任教班级 */
  getCourseClassesTeach() {
    return http.get(`/course/classes/teach`)
  },
  /* 班级-学员 */
  getCourseClassesStudents(id, query) {
    return http.get(`/course/classes/${id}/students`, query)
  },
  /* 班级-移除学员 */
  deleteCourseClassesStudent(id, user_id) {
    return http.delete(`/course/classes/${id}/student/${user_id}`)
  },
  /* banner图 */
  getConfigBanner(query) {
    return http.get(`/config/banner`, query)
  },
  /* 资讯-列表 */
  getTopicList(query) {
    return http.get(`/topic/list`, query)
  },
  /* 资讯-详情 */
  getTopicDetails(id) {
    return http.get(`/topic/${id}/fetch`)
  },
  /* 资讯-评论列表 */
  getTopicComment(id, query) {
    return http.get(`/topic/${id}/comment`, query)
  },
  /* 资讯-添加评论 */
  createTopicComment(id, query) {
    return http.post(`/topic/${id}/comment`, query)
  },
  /* 资讯-评论点赞 */
  putTopicCommentLike(id, query) {
    return http.put(`/topic/comment/${id}/like`, query)
  },
  /* 资讯-楼中楼列表 */
  getTopicCommentReply(id, query) {
    return http.get(`/topic/comment/${id}/reply`, query)
  },
  /* 资讯-评论回复点赞 */
  putTopicCommentReplyLike(id, query) {
    return http.put(`/topic/reply/${id}/like`, query)
  },
  /* 资讯-回复评论 */
  createTopicCommentReply(id, query) {
    return http.post(`/topic/comment/${id}/reply`, query)
  },
  /* 协议 */
  getContentAgreementFetch(key) {
    return http.get(`/content/agreement/${key}/fetch`)
  },
  // 拼团详情
  getPromotionPintuanDetail(query) {
    return http.get(`/promotion/pintuan/detail`, query)
  },
  // 课程开团列表
  getPromotionPintuanList(query) {
    return http.get(`/promotion/pintuan/list`, query)
  },
  // 砍价详情
  getPromotionBargainDetail(query) {
    return http.get(`/promotion/bargain/detail`, query)
  },
  // 砍价详情
  postPromotionBargainDoit(query) {
    return http.post(`/promotion/bargain/doit`, query)
  },
  // 支付前发起拼团
  postPromotionPintuanCreate(query) {
    return http.post(`/promotion/pintuan/create`, query)
  },
  // 支付前加入拼团
  postPromotionPintuanJoin(query) {
    return http.post(`/promotion/pintuan/join`, query)
  },
  // 获取分享信息
  getShareInfo(query) {
    return http.get(`/share/info`, query)
  },
  // 获取声网配置
  getAgoraConfig() {
    return http.get(`/course/live/agora/config`)
  },
  // 获取声网课堂用户房间信息
  getAgoraRoom(section_id) {
    return http.get(`/course/live/agora/room/${section_id}`)
  },
  // 用户进入房间
  postAgoraIntoRoom(section_id) {
    return http.post(`/course/live/agora/room/${section_id}/entry`)
  },
  // 获取声网课堂用户房间信息
  getAgoraRoomMsg(section_id) {
    return http.get(`/course/live/agora/room/${section_id}`)
  },
  // 获取声网白板OSS配置
  getAgoraNetless() {
    return http.get(`/course/live/agora/netless`)
  },
  // 创建房间
  getCreateRoom(query) {
    return http.post(`/course/live/agora/room/config`, query)
  },
  // 查询房间配置
  getRoomConfig(param) {
    return http.get(`/course/live/agora/room/config`, param)
  },
  // 获取用户和流列表
  getRoomUserList(section_id, param) {
    return http.get(`/course/live/agora/room/${section_id}/user/streams`, param)
  },
  // 获取直播带课数据
  getLiveCourse(param) {
    return http.get(`/course/live/room/coursedatas`, param)
  },
  // 开关
  getSwitch() {
    return http.get(`/config/switch`)
  },
  // cc_直播验证
  postCcliveEntry(query) {
    return http.post(`/course/cclive/room/entry`, query)
  },
  // 绑定人脸照片
  postFacePerson(query) {
    return http.post(`/user/tencent/face/person`, query)
  },
  // 验证当前登录人员照片
  postVerityPerson(query) {
    return http.post(`/user/tencent/face/person/verify`, query)
  },
  // 个人主页基础信息
  getPersonHomeBase(param) {
    return http.get(`/user/home/base`, param)
  },
  // 个人主页动态
  getPersonHomeCircle(param) {
    return http.get(`/user/home/circle`, param)
  },
  // 圈子列表
  getCircleList(param) {
    return http.get(`/circle/list`, param)
  },
  // 点赞/取消圈子或评论
  postCircleLike(query) {
    return http.post(`/circle/like`, query)
  },
  // 圈子详情
  getCircleDetail(param) {
    return http.get(`/circle`, param)
  },
  // 删除圈子
  deleteCicle(param) {
    return http.delete(`/circle`, param)
  },
  // 评论或回复评论圈子
  postCircleComment(query) {
    return http.post(`/circle/comment`, query)
  },
  // 删除评论
  deleteComment(param) {
    return http.delete(`/circle/comment`, param)
  },
  // 发布圈子
  postCicle(query) {
    return http.post(`/circle`, query)
  },
  // 转载圈子渲染
  getRecircle(param) {
    return http.get(`/circle/recircle`, param)
  },
  // 转载圈子
  postRecircle(query) {
    return http.post(`/circle/recircle`, query)
  },
  // 个人主页课程
  getHomeCourse(param) {
    return http.get(`/user/home/course`, param)
  },
  // 一级分类列表
  getCategoryTop() {
    return http.get(`/exam/category/top`)
  },
  // 二级分类列表
  getCategorySecond(param) {
    return http.get(`/exam/category/second/tree`, param)
  },
  // 提现 - 微信 - openid
  getEncashment(param) {
    return http.get(`/user/income/encashment/wxpay/openid`, param)
  },
  // 商品列表
  getMallProductList(params) {
    return http.get(`/mall/product/list`, params)
  },
  // 商品热门搜索
  getMallProductHotsearch() {
    return http.get(`/mall/product/hotsearch`)
  },
  // 商品详情
  getMallProductDetails(id) {
    return http.get(`/mall/product/${id}`)
  },
  // 商品订单
  getMallOrderFetch(params) {
    return http.get(`/mall/order/fetch`, params)
  },
  // 提交商品订单
  postMallOrderSubmit(query) {
    return http.post(`/mall/order/submit`, query)
  },
  // 收货地址列表
  getMallAddressList() {
    return http.get(`/mall/address/list`)
  },
  // 添加收货地址
  postMallAddressAdd(query) {
    return http.post(`/mall/address/add`, query)
  },
  // 设为默认收货地址
  putMallAddressDefault(query) {
    return http.put(`/mall/address/default`, query)
  },
  // 修改收货地址
  putMallAddressUpdate(query) {
    return http.put(`/mall/address/update`, query)
  },
  // 删除收货地址
  deleteMallAddress(query) {
    return http.delete(`/mall/address/del`, query)
  },
  /* 我的证书 */
  getUserCert(params) {
    return http.get(`/course/base/student/cert`, params)
  },
  /* 证书详情 */
  getUserCertDetail(params) {
    return http.get(`/course/base/student/cert/detail`, params)
  },

  /* 直播课表-日 */
  getUserCourseScheduleDaily(params) {
    return http.get(`/user/course/schedule/daily`, params)
  },
  /* 直播课表-区间 */
  getUserCourseSchedulePeriod(params) {
    return http.get(`/user/course/schedule/period`, params)
  },

  /* 当前课时是否解锁 */
  getCourseUnlock(params) {
    return http.get(`/course/unlock`, params)
  },
  // 微信公众号appid
  getPayWxappid() {
    return http.get(`/pay/wxappid`)
  },
  // 三方登录检查
  getConfigThirdloginCheck(params) {
    return http.get(`config/thirdlogin/check`, params)
  },
  // 获取课程验证试题
  getCourseQuestion(id, query) {
    return http.get(`/course/base/${id}/question`, query)
  },
  // 课程课件列表
  getCourseCourseware(id) {
    return http.get(`/course/base/${id}/courseware`)
  },
  // 添加课程课件下载记录
  postCourseCoursewareRecord(query) {
    return http.post(`/course/base/courseware/record`, query)
  },
  /**
   * @description 首页-模板
   */
  getHomeTemplate() {
    return http.get('/home/template')
  },
  /**
   * @description 首页-分类课程
   */
  getHomeTemplateCatecourse(query) {
    return http.get('/home/template/catecourse', query)
  },

  /**
   * @description 我的待考-指派考试
   */
  getUserExamRecordStudent(query) {
    return http.get(`/user/exam/record/student`, query)
  },

  /**
   * @description 我的待考-购买考试
   */
  getUserExamRecordOrder(query) {
    return http.get(`/user/exam/record/order`, query)
  },

  /**
   * @description 我的待考-购买考试
   */
  getUserExamRecordRollup(id) {
    return http.get(`/user/exam/record/rollup/${id}`)
  },

  /* 未读消息 */
  getUserNotifyUnread() {
    return http.get(`/user/notify/unread`)
  },

  /* 删除课程评论 */
  deleteCourseComment(id) {
    return http.delete(`/course/base/comment/${id}`)
  },
  /* 删除课程评论回复 */
  deleteCourseCommentReply(id) {
    return http.delete(`/course/base/comment/reply/${id}`)
  },
  /* 删除资讯评论 */
  deleteTopicComment(id) {
    return http.delete(`/topic/comment/${id}`)
  },
  /* 删除资讯评论 */
  deleteTopicCommentReply(id) {
    return http.delete(`/topic/reply/${id}`)
  },
}
